<html class="x-admin-sm">
<head>
    <meta charset="UTF-8">
    <style>
        .zh {
            background-color: #93D1FF;
        }

        th {
            background: #f0f0f0;
            text-align: center;
            width: 25%;
        }
        td{
            width: 25%;
        }
    </style>
    <script type="text/javascript" th:src="@{/js/require.js}"></script>
    <script type="text/javascript" th:src="@{/js/requireConfig.js}"></script>
    <script type="text/javascript" th:src="@{/js/app/small/base/home.js}"></script>
</head>
<body>
<div id="uploadLoadingDiv">
    <div class="layui-progress" lay-filter="demo">
        <div class="layui-progress-bar layui-bg-orange" lay-percent="0%"></div>
    </div>
</div>
<div class="layui-fluid" id="base" style="position:absolute;top:0px;bottom: 40px;width: 100%">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-md12">
            <div class="layui-card">
                <div class="layui-card-body ">
                    <table class="layui-table" id="appx">
                        <tr>
                            <th>店铺名称</th>
                            <td @dblclick="editDBL($event)" name="appName">{{config.appName}}</td>
                            <th>店铺logo</th>
                            <td @dblclick="editDBLIMG($event)"><a v-bind:href="config.appImg" target="_blank" style="border-bottom: 1px blue solid" name="appImg">{{config.appImg}}</a></td>
                            <button type="button" class="layui-btn" id="logo" style="display: none">
                                <i class="layui-icon">&#xe67c;</i>上传图片
                            </button>
                        </tr>
                        <tr>
                            <th>公告</th>
                            <td colspan="3" @dblclick="editDBLTEXT($event)" name="appGG">{{config.appGG}}</td>
                        </tr>
                    </table>
                    <div class="layui-btn-group">
                        <button @click="up_save()" type="button"
                                class="layui-btn layui-btn-warm layui-btn-sm">
                            <i class="layui-icon layui-icon-list"></i>保存
                        </button>
                        <button @click="referXadmin()" type="button"
                                class="layui-btn layui-btn-normal layui-btn-sm">
                            <i class="layui-icon layui-icon-refresh-1"></i>刷新
                        </button>
                    </div>
                </div>
            </div>
            <div class="layui-card" id="list">
                <div class="layui-card-header" style="padding-top: 10px">
                    <div class="layui-btn-group">
                        <button @click="show_add()" type="button" class="layui-btn layui-btn-normal layui-btn-sm">
                            <i class="layui-icon layui-icon-add-1"></i>增加
                        </button>
                        <button @click="show_update()" type="button"
                                class="layui-btn layui-btn-normal layui-btn-sm">
                            <i class="layui-ic-on layui-icon-edit"></i>修改
                        </button>
                        <button @click="deleted()" type="button" class="layui-btn layui-btn-danger layui-btn-sm">
                            <i class="layui-icon layui-icon-delete"></i>删除
                        </button>
                    </div>
                </div>
                <div class="layui-card-body">
                    <table class="layui-table" id="tab" lay-size="sm">
                        <thead>
                        <tr>
                            <th>序号</th>
                            <th v-for="(ls,i) in listCol">
                                {{ls}}
                            </th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr v-for="(ls,i) in list" onclick="sure(this)">
                            <td>{{i+1}}</td>
                            <td  v-for="(lsx,key) of ls" v-if="key=='uuid'" style="display: none">
                                {{lsx}}
                            </td>
                            <td  v-for="(lsx,key) of ls" v-if="key!='uuid'">
                                {{lsx}}
                            </td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </div>
            <div class="layui-card" id="add" style="display: none">
                <div class="layui-card-body">
                    <button type="button" class="layui-btn layui-btn-normal" @click="pre_home()">
                        <i class="layui-icon layui-icon-return"></i>&nbsp;返回
                    </button>
                    <form class="layui-form" action="" style="width: 50%;padding-top: 20px;margin-left: 25%">
                        <div class="layui-form-item">
                            <label class="layui-form-label">优惠标题<i class="icon-re">*</i></label>
                            <div class="layui-input-inline">
                                <input type="text" name="bt" required  lay-verify="required" placeholder="请输入优惠标题" autocomplete="off" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">优惠内容<i class="icon-re">*</i></label>
                            <div class="layui-input-inline">
                                <input type="text" name="val" required lay-verify="required" placeholder="请输入优惠内容" autocomplete="off" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">次序<i class="icon-re">*</i></label>
                            <div class="layui-input-inline">
                                <input type="number" name="cx" required lay-verify="required" placeholder="请输入次序" autocomplete="off" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <div class="layui-input-block">
                                <button class="layui-btn" lay-submit lay-filter="formDemo">立即提交</button>
                                <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
            <div class="layui-card" id="update" style="display: none">
                <div class="layui-card-body">
                    <button type="button" class="layui-btn layui-btn-normal" @click="pre_home()">
                        <i class="layui-icon layui-icon-return"></i>&nbsp;返回
                    </button>
                    <form class="layui-form" action="" style="width: 50%;padding-top: 20px;margin-left: 25%">
                        <div class="layui-form-item">
                            <label class="layui-form-label">优惠标题<i class="icon-re">*</i></label>
                            <div class="layui-input-inline">
                                <input type="text" name="bt" v-bind:value="th.bt" required  lay-verify="required" placeholder="请输入优惠标题" autocomplete="off" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">优惠内容<i class="icon-re">*</i></label>
                            <div class="layui-input-inline">
                                <input type="text" name="val" v-bind:value="th.val" required lay-verify="required" placeholder="请输入优惠内容" autocomplete="off" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">次序<i class="icon-re">*</i></label>
                            <div class="layui-input-inline">
                                <input type="number" name="cx" v-bind:value="th.cx" required lay-verify="required" placeholder="请输入次序" autocomplete="off" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <div class="layui-input-block">
                                <button class="layui-btn" lay-submit lay-filter="formDemos">立即提交</button>
                                <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
</body>
</html>